#ifndef GIFGRAPHICCONTROLEXTENSION_H
#define GIFGRAPHICCONTROLEXTENSION_H

#include "gifextension.h"

namespace WingGif {

class WINGEXPORT GifGraphicControlExtension : public GifExtension {
  Q_OBJECT
  Q_PROPERTY(int blockSize READ blockSize)
  Q_PROPERTY(int disposalMethod READ disposalMethod)
  Q_PROPERTY(bool userInput READ userInput)
  Q_PROPERTY(bool hasTransparency READ hasTransparency)
  Q_PROPERTY(int delay READ delay)
  Q_PROPERTY(int transparencyIndex READ transparencyIndex)

public:
  int blockSize();
  int disposalMethod();
  bool userInput();
  bool hasTransparency();
  int delay();
  int transparencyIndex();

  bool read(QIODevice *stream,
            QList<GifExtension *> controlExtensions) override;
  GifBlockKind kind() override;

  GifGraphicControlExtension(QObject *parent = nullptr);

private:
  int _blockSize;
  int _disposalMethod;
  bool _userInput;
  bool _hasTransparency;
  int _delay;
  int _transparencyIndex;
};

} // namespace WingGif

#endif // GIFGRAPHICCONTROLEXTENSION_H
